package cn.edu.cqu.actions;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;

//@Results({
//        @Result(name = Action.SUCCESS, location = "${redirectName}", type = "redirectAction")
//})
public class Index extends ActionSupport {

    private String redirectName;
   @org.apache.struts2.convention.annotation.Action("index")
    public String execute() {
    	//这里应该写action的名字，不需要加后缀
        redirectName = "login";
        System.out.println("index.jsp");
        return Action.SUCCESS;
    }

    public String getRedirectName() {
        return redirectName;
    }

}
